﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="mana.aspx.cs" Inherits="admin_mana" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <style type="text/css">
        .style1
        {
            width: 720px;
        }
        .style2
        {
            width: 480px;
            height: 33px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table  id="table1"class="style1">
    <tr>
    <td colspan ="2" align="center" >
     <asp:HyperLink 
    ID ="hyperhink1"
    NavigateUrl="../admin/post.aspx"
   Text="添加新投票"
    runat="server" />
    </td>
    </tr>
    <tr>
    <td colspan ="2" >
      <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
    BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id" 
    DataSourceID="SqlDataSource1" PageSize="20" Width="100%">
    <FooterStyle BackColor="White" ForeColor="#000066" />
    <RowStyle ForeColor="#000066" />
    <Columns>
       <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" 
        ReadOnly="True" SortExpression="id">
       <ItemStyle Width="30px" />
       </asp:BoundField>
       <asp:BoundField DataField="voteTitle" HeaderText="title" SortExpression="title" />
         <asp:HyperLinkField DataNavigateUrlFields="id" 
         DataNavigateUrlFormatString="../admin/modi.aspx?id={0}" Text="修改">
         <ItemStyle Width="40px" />
       </asp:HyperLinkField>
          <asp:HyperLinkField DataNavigateUrlFields="id" 
          DataNavigateUrlFormatString="../admin/delete.aspx?id={0}" Text="删除">
          <ItemStyle Width="40px" />
        </asp:HyperLinkField>
     </Columns>
     <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
     <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
     <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
     </asp:GridView>

     <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
     SelectCommand="SELECT * FROM [voteMaster] ORDER BY [id] DESC"
     ConnectionString ="<%$ConnectionStrings:ConnectionString %>" >
     </asp:SqlDataSource>
    </td>
    </tr>
    <tr>
     <td class="style2" >
      <asp:Label 
      ID="Label1" 
      runat ="server" />
      </td>
      <td  >
      <asp:Button 
      ID="Button1" 
      runat="server" 
      onclick="Button1_Click" 
      Text="投票页面" />
      <asp:Button
       ID ="Button2"
       runat="server" 
       OnClick ="Button2_Click"
       Text="结果页面" />
     </td>
    </tr>
    </table>
    </div>
    </form>
</body>
</html>
